package cn.xianshu.pet.mapper;



import cn.xianshu.basic.mapper.BasicMapper;
import cn.xianshu.pet.domain.Pet;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
@Component
public interface PetMapper extends BasicMapper<Pet> {
    void onsale(Map<String, Object> params);

    void offSale(Map<String, Object> params);

    Pet loadByIdDetail(Long id);


    /**
     * 批量查询待上架的数据
      * @param ids
     * @param state
     * @return
     */
    List<Pet> selectloadById(@Param("ids") List<Long> ids, @Param("state")Integer state);

    /**
     * 根据状态获取某个宠物和详情
     * @param id
     * @param state
     * @return
     */
    Pet selectOnLineById(@Param("id") Long id, @Param("state") Integer state);

    /**
     * 批量查询带上架的宠物列表
     * @param list
     * @param offsaleId
     * @return
     */
    List<Pet> batchSelectByIds(List<Long> list, int offsaleId);

}
